package cn.kkcxy.blog.core.entity.sys;

import com.baomidou.mybatisplus.annotation.*;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import java.io.Serializable;
import java.util.Date;

/**
 * 
 * @TableName sys_permission
 */
@Schema(description = "权限表")
@TableName(value ="sys_permission")
@Data
public class SysPermission implements Serializable {
    /**
     * 编号
     */
    @TableId(value = "id", type = IdType.AUTO)
    @Schema(description = "权限编号")
    private Long id;

    /**
     * 上级编号
     */
    @TableField(value = "parent_id")
    @Schema(description = "上级编号")
    private Long parentId;

    /**
     * 权限名称
     */
    @TableField(value = "name")
    @Schema(description = "权限名称")
    private String name;

    /**
     * 类型(0:目录,1:菜单,2:按钮)
     */
    @TableField(value = "type")
    @Schema(description = "类型(0:目录,1:菜单,2:按钮)")
    private Integer type;

    /**
     * 菜单路由
     */
    @TableField(value = "path")
    @Schema(description = "菜单路由")
    private String path;

    /**
     * 路由地址
     */
    @TableField(value = "component")
    @Schema(description = "路由地址")
    private String component;

    /**
     * 权限唯一标识
     */
    @TableField(value = "permission_key")
    @Schema(description = "权限唯一标识")
    private String permissionKey;

    /**
     * 权限标题
     */
    @TableField(value = "title")
    @Schema(description = "权限标题")
    private String title;

    /**
     * 图标
     */
    @TableField(value = "icon")
    @Schema(description = "图标")
    private String icon;

    /**
     * 排序
     */
    @TableField(value = "sort")
    @Schema(description = "排序")
    private Integer sort;

    /**
     * 状态 0启用 1禁用
     */
    @TableField(value = "status")
    @Schema(description = "状态 0启用 1禁用")
    private Integer status;

    /**
     * 是否隐藏 0不隐藏 1隐藏
     */
    @TableField(value = "hidden")
    @Schema(description = "是否隐藏 0不隐藏 1隐藏")
    private Integer hidden;

    /**
     * 创建人
     */
    @TableField(value = "created_by")
    @Schema(description = "创建人")
    private String createdBy;

    /**
     * 创建时间
     */
    @TableField(value = "created_time", fill = FieldFill.INSERT)
    @Schema(description = "创建时间")
    private Date createdTime;

    /**
     * 更新人
     */
    @TableField(value = "updated_by")
    @Schema(description = "更新人")
    private String updatedBy;

    /**
     * 更新时间
     */
    @Schema(description = "更新时间")
    @TableField(value = "updated_time", fill = FieldFill.INSERT_UPDATE)
    private Date updatedTime;

    /**
     * 是否被删除 0未删除 1已删除
     */
    @Schema(description = "是否被删除 0未删除 1已删除")
    @TableField(value = "deleted")
    @TableLogic(value = "0", delval = "1")
    private Integer deleted;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;
}